cmake_minimum_required(VERSION 2.6)
project(get_picture)

# Save the command line compile commands in the build output
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
# View the makefile commands during build
#set(CMAKE_VERBOSE_MAKEFILE on)

if(BUILD_GRAPHICAL_EXAMPLES)
    include(${CMAKE_SOURCE_DIR}/CMake/opengl_config.cmake)
else()
    if(ANDROID_NDK_TOOLCHAIN_INCLUDED)
        find_library(log-lib log)
        set(DEPENDENCIES realsense2 log)
    else()
        set(DEPENDENCIES realsense2)
    endif()
endif()



add_executable(get_picture main.cpp)

set_property(TARGET get_picture PROPERTY CXX_STANDARD 11)

target_link_libraries(get_picture ${DEPENDENCIES})

set_target_properties (get_picture PROPERTIES FOLDER "Examples")

find_package(OpenCV REQUIRED)

INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIR})

LINK_LIBRARIES(${OpenCV_LIBRARY_DIR})

target_link_libraries(get_picture ${OpenCV_LIBS})
